-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add FrameBuffer::getPixelWidth/Height and ShaderProgram::Context::set…
…Uniform(int location, Rgb)
- Loading branch information
Showing
6 changed files
with
28 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
// Copyright 2007-2024 Jan Niklas Hasse <[email protected]> | ||
// Copyright 2007-2025 Jan Niklas Hasse <[email protected]> | ||
// For conditions of distribution and use, see copyright notice in LICENSE.txt | ||
|
||
#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS | ||
#include "freetype.hpp" | ||
|
||
#include "ShaderCache.hpp" | ||
#include "helper.hpp" | ||
#include "jngl/Finally.hpp" | ||
#include "jngl/ScaleablePixels.hpp" | ||
#include "jngl/matrix.hpp" | ||
#include "jngl/screen.hpp" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
// Copyright 2012-2023 Jan Niklas Hasse <[email protected]> | ||
// Copyright 2012-2025 Jan Niklas Hasse <[email protected]> | ||
// For conditions of distribution and use, see copyright notice in LICENSE.txt | ||
/// Contains jngl::FrameBuffer class | ||
/// @file | ||
#pragma once | ||
|
||
#include "Color.hpp" | ||
#include "Finally.hpp" | ||
#include "Mat3.hpp" | ||
#include "Pixels.hpp" | ||
#include "Vec2.hpp" | ||
#include "Vertex.hpp" | ||
#include "ShaderProgram.hpp" | ||
|
||
#include <functional> | ||
#include <memory> | ||
#include <vector> | ||
|
||
|
@@ -93,6 +93,9 @@ class FrameBuffer { | |
/// Returns the size in screen pixels | ||
Vec2 getSize() const; | ||
|
||
Pixels getPixelWidth() const; | ||
Pixels getPixelHeight() const; | ||
|
||
/// Returns the OpenGL texture ID of the associated image buffer | ||
/// | ||
/// While this is an implementation detail, it can be useful if you want to draw the | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
// Copyright 2018-2020 Jan Niklas Hasse <[email protected]> | ||
// Copyright 2018-2025 Jan Niklas Hasse <[email protected]> | ||
// For conditions of distribution and use, see copyright notice in LICENSE.txt | ||
/// Contains jngl::ShaderProgram class | ||
/// @file | ||
#pragma once | ||
|
||
#include "Finally.hpp" | ||
#include "Rgb.hpp" | ||
|
||
#include <memory> | ||
#include <string> | ||
|
@@ -39,6 +39,9 @@ class ShaderProgram { | |
static void setUniform(int location, float v0, float v1); | ||
static void setUniform(int location, float v0, float v1, float v2, float v3); | ||
|
||
/// sets a vec3 to the color of the Rgb object | ||
static void setUniform(int location, Rgb); | ||
|
||
private: | ||
static int referenceCount; | ||
static const Impl* activeImpl; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
// Copyright 2012-2024 Jan Niklas Hasse <[email protected]> | ||
// Copyright 2012-2025 Jan Niklas Hasse <[email protected]> | ||
// For conditions of distribution and use, see copyright notice in LICENSE.txt | ||
/// Contains jngl::Sprite class and related functions | ||
/// \file | ||
#pragma once | ||
|
||
#include "Drawable.hpp" | ||
#include "Finally.hpp" | ||
#include "Rgb.hpp" | ||
#include "Rgba.hpp" | ||
#include "ShaderProgram.hpp" | ||
|