FAQ Database Discussion Community


How to draw different tiles using an IBO?

opengl,indexing,textures,mesh,vbo
My aim is to draw a bunch of "blocks" using a mesh in OpenGL. I can draw a mesh with a VBO and an IBO. But I don't know how to handle texture coordinates because in my "concept" not each adjacent block shares the same texture coordinates. But by using...

C++ SDL texture Error Microsoft Visual Studio 2013

c++,image,textures,sdl,sdl-2
I'm trying to run this code but it keeps giving me an error. I copyed SDL2_image.lib in the debug folder but in vain. I'm at the beggining of programming so please be patient. Errors: Error 1 error C3861: 'IMG_LoadTexture': identifier not found Error 2 IntelliSense: identifier "IMG_LoadTexture" is undefined #include<SDL/SDL.h>...

OGRE EXCEPTION(7:InternalErrorException): Error decoding image in FreeImageCodec::decode at

c++,opengl,3d,textures,ogre
I'm using Ogre 3D 1.9, and I'm trying to load a mesh contained in a folder pointed by the resource.cfg file. The folder contains sub-folders, that separate the .mesh files, .material files and textures. Here's the content of the resource.cfg file: # Resources required by the sample browser and most...

how can i use part of a image as texture in three.js

three.js,textures
I have a image with 6 faces texture of a cube in it.How can i apply every part of the image to each side of the cube?Theie seems no relative option in three.js

Texture mapping consuming physical memory

c++,opengl,mapping,textures,glut
there's a problem with my texture mapping, when I execute the code, it run smoothly for 5-8 sec, then the framerate drop drastically, when I monitor the task manager, it seem the program consuming almost 95% of my physical memory, anybody know how to solve this problem?? I'm using visual...

OpenGL optimised representation of textures

opengl,graphics,3d,textures
I have read many places that one should avoid OpenGL textures that are 3 bytes long and should always use 4 bytes bus aligned representations. Keeping that in mind, I have a couple of questions about the glTextImage2D API. From the documentation, the API signature is: void glTexImage2D(GLenum target, GLint...

Programmatically generate texture for WebGL in JavaScript

javascript,opengl-es,textures,webgl
I have the following code to programmatically generate a texture for WebGL in C. I need to do the same thing in JavaScript for WebGL. How do I properly create the 3 dimensional checkerboard matrix? GLubyte checkerboard[64][64][3]; How do I set the values? checkerboard[i][j][0] = (GLubyte) c; How do I...

Is it possible to use WebGL max texture size?

javascript,browser,textures,webgl
I am working on an app where higher resolution is always better. But I'm stuck with WebGL max_texture_size problems. I create an image of size exactly this dimension (16384x16384 on my laptop) and WebGL crashes saying that: GL_INVALID_ENUM : glBindFramebuffer: target was GL_READ_FRAMEBUFFER_ANGLE GL_INVALID_ENUM : glBindFramebuffer: target was GL_READ_FRAMEBUFFER_ANGLE WebGL:...

very large background textures

android,opengl-es,libgdx,textures
For a game I'm developing I must use large background images. These images are around 5000x3000. When attempting to display that as a single texture I would get black boxes in GWT and Android. I created a class that splits the image into a grid of textures: public class LargeImage...

Apply multiple effect on bitmap without saving it

android,image-processing,bitmap,textures,effect
My requirement is to load multiple Effect on bitmap. I am following apply-effects-on-image-using-effects for it. I got success for applying the effect but My requirements is to give brightness effect separately. That means user can able to give Brightness effect after applying any other effect without saving the file. I...

What is the difference between glGenTextures and glGenSamplers?

c++,opengl,textures
I am following a tutorial to handle loading in textures, it has this method in it : void CTexture::CreateEmptyTexture(int a_iWidth, int a_iHeight, GLenum format) { glGenTextures(1, &uiTexture); glBindTexture(GL_TEXTURE_2D, uiTexture); if(format == GL_RGBA || format == GL_BGRA) glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, a_iWidth, a_iHeight, 0, format, GL_UNSIGNED_BYTE, NULL); // We must handle this...

Weird lines on camera feed with Opencv + Irrlicht on Texture Mapping

c++,opencv,textures,webcam,irrlicht
I've Been trying to texturemap Irrlicht 3d model with Opencv Camera for an augmented reality project, Im using irrlicht 1.8.1 and opencv 2.4.9, and i almost got the textureMapping done, but the problem is there are weird lines coming in the camera feed and its below 4fps and the output...

OpenGL reading from unbound texture unit

opengl,textures,shader
Does the OpenGL standard mandate what the result of a texture2d operation should be given a uniform sampler2D that the program hasn't bound to a texture unit? For example in the pixel shader: layout(binding=0) uniform sampler2D Map_Diffuse; ... texture2D(Map_Diffuse, attrib_Fragment_Texture) Where in the program: ::glActiveTexture(GL_TEXTURE0); ::glBindTexture(GL_TEXTURE_2D, 0); For context I'm...

Ruby, openGL : change texture luminosity

ruby,opengl,textures
I have some problems with OpenGL and luminosity. Let me explain you my problem : I drew this "sprite" (it's only a plane here) with a code like that : sprite.set_active left, right, top, bottom = 0.0, 1.0, 1.0, 0.0 glPushMatrix glTranslate(@position.x - 16, @position.y, @position.z) glRotate(-90 [email protected]_angle, 0, 1,...

Text Rendering WebGL

javascript,html,textures,webgl
I am trying to give text labels to different elements in a 2D image. The 2d elements are obtained through projection from 3d. I have certain element ids that I want to include as text labels. I have been trying this for 2 days with no luck. I dont know...

Clearing DRAW framebuffer only works if attached to GL_COLOR_ATTACHMENT0?

opengl,textures,clear,framebuffer
I am trying to initialize a texture with all zeros, using DRAW framebuffer as suggested by this post. However, I'm quite puzzled that my DRAW framebuffer is only cleared when I attached it to GL_COLOR_ATTACHMENT0: int levels = 2; int potW = 2; int potH = 2; GLuint _potTextureName; glGenTextures(1,...

Function to load textures not working correctly

c++,opengl,textures
So I wrote a helper function that just loads a png file disc and loads it into an OpenGL shader. This all works fine and well until I try to load multiple textures. The problem that I run into is the fact it seems to overrite all previous textures each...

Textures not working

java,opengl,textures,lwjgl,texture2d
So ok. That OpenGL state machine is kiddin' me! I'm serious! Just few days ago all worked with immediate mode and even VBO mode, but not today! Today im seein a white quad, cause i rewrote 80% of my old code. Thats such a cool thing, yo know. So. I...

Moving texture OpenGL ES 2.0

android,opengl-es,textures
I am trying to implement a sprite of 8 columns and 8 rows in OpenGL ES 2.0 I made appear the first imagen but I cant figure out how to translate the Texture matrix in OpenGL ES 2.0 , the equivalent of the code in OpenGL 1.0 that I am...

Capturing macro and micro geometry using image features

image-processing,textures,sift,pattern-recognition,lbph-algorithm
I am extracting image features for texture identification. I want to extract image features from a 2D image. These features should capture the micro as well as macro geometry of the image. I have tried to find out some algorithm which can give me the above result. I tried SIFT...

When is a Three.js Texture sent to the GPU?

javascript,three.js,textures,gpu
I am building an application that dynamically loads images from a server to use as textures in the scene and I am working on how to load/unload these textures properly. My simple question is; Where, in the Three.js call graph, does textures get loaded and/or updated into the GPU? Is...

Most performant way to load textures from a Spritekit texture atlas

ios,iphone,sprite-kit,textures
I cannot figure out how to load my textures in a brief few seconds. It is taking a monster 20+ seconds. Initially I had my animations in separate texture atlases. They are named something like [email protected]~iphone.png. When they were separate I used code similar to that in the Apple documentation:...

Understanding logic of SpriteKit animation with texture atlases

ios,animation,sprite-kit,textures
I just don't get it. For example: I'm making a game with enemies. I made some pics and put it into atlas. I want an enemy to stand still before he will collide with hero and then implement an animation. Should I add first pic from atlas to represent an...

Looping a texture on a surface

c++,qt,opengl,textures,texture-mapping
I want to know how to loop a texture on the surface of an object. For a practical example, I'm trying to handle rendering world geometry, so that when I resize a world object twice the size of its texture, the texture will then appear twice - not double in...

Libgdx : Detect empty TextureRegion

java,libgdx,textures
I've been building a little game in Libgdx for a couple of days now and I wanted to implement some kind of dynamic sprite-analyzer. I have a png-file that I split into TextureRegions and build a Animation out of. So I split up the Image in 64x64 Regions and iterate...

Passing 2 Textures into fragmenshader

ios,opengl-es,textures,multitexturing
Im want to get to different textures in my fragment shader. But somehow it won't work. It is only getting one of them. I'm starting my rendering with : glBindVertexArrayOES(_heighMap.vertexArray); //Get Uniforms GLuint mapProj = glGetUniformLocation(_mapProgram, "modelViewProjectionMatrix"); GLuint mapView = glGetUniformLocation(_mapProgram, "modelViewMatrix"); GLuint mapNormal = glGetUniformLocation(_mapProgram, "normalMatrix"); GLuint map2D0 =glGetUniformLocation(_mapProgram,...

Is three.js ObjectLoader capable of loading textures?

three.js,textures,blender
three.js version 0.0.70, blender version 2.73a I have a scene exported from blender to three.js json format using new io_three (not io_three_mesh) exporter. I'm able to import the scene into three.js using ObjectLoader: var objectLoader = new THREE.ObjectLoader(); objectLoader.load('assets/models/exportedScene.json', function(imported) { scene.add(imported); }); Unfortunatelly, no texture is applied to an...

How to go from raw Bitmap data to SDL Surface or Texture?

c++,bitmap,textures,sdl,surface
I'm using a library called Awesomium and it has the following function: void Awesomium::BitmapSurface::CopyTo ( unsigned char * dest_buffer, // output int dest_row_span, // input that I can select int dest_depth, // input that I can select bool convert_to_rgba, // input that I can select bool flip_y // input that...

Unable to render a texture on a quad

c++,opengl,textures,texturing
I am trying to program a simple game in C++ using OpenGL for graphics. In my game, I have objects that are rendered onscreen as a white square. I would like to be able to bind an image as a texture to these objects, so that I can render an...

How to compare the textures in LibGdx

android,libgdx,textures
I am using LibGdx for my game. In the below method I am passing the RED_BALL but the method is not returning true. I want to know if the texture comparision is possible. if so what is the best approach. private boolean isSqueezableBalls(Texture t) { if(t.equals(RED_BALL) || t.equals(BLUE_BALL) || t.equals(GREEN_BALL)){...

How to DEBUG OpenGL a gray/black texture box?

debugging,opengl,textures,java-6,tga
I'm altering someone else's code. They used PNG's which are loaded via BufferedImage. I need to load a TGA instead, which is just simply a 18 byte header and BGR codes. I have the textures loaded and running, but I get a gray box instead of the texture. I don't...

Blender Exporting OBJ - material is not exported

textures,blender,.obj
I am new to blender so I don't know how it works properly. Here is my story, I worked on a model and added material to it using the cycles render method. Then I exported the project with these settings To confirm that everything is right, I imported this model...

CUDA6.5 Can't extern the value of texture

cuda,textures,extern
I had written a program follow the JackOlantem's answer in CUDA extern texture declaration but my result dosen't print the value of extern texture declaration P/s: how to add -rdc = true to enable external linkage? Result of the program ! http://i.stack.imgur.com/aGh3U.png Thanks for your help!!. kernel.cu compilation unit #include...

Icon rendering on OpenGL

opengl,graphics,icons,textures
I want to render an RGBA icon (for an UI) using OpenGL. First, I used gimp to scale the icon to a power of 2. Then, I have used lodepng to load the icon, and then I rendered it using OpenGL (icon texture uses GL_LINEAR and GL_LINEAR_MIPMAP_LINEAR). The icon is...

Create a 2D texture from existing textures

three.js,textures,webgl,texture-atlas
I have an application where I load a series of medical images (jpg), create a texture object for each image and display those textures on 3D planes. The amount of images depends in the CT scanner's resolution but my prototype should work with up to 512. As an additional task,...

CopyResource from one D3D11 device to another

c++,textures,direct3d,direct3d11
I can copy the content from a D3D11 texture to another one with ID3D11DeviceContext::CopyResource. The method belongs to the immediate context of a specific device, so I cannot copy a texture from one device to another one (I have tried it - it explodes as expected saying "D3D11 CORRUPTION: ID3D11DeviceContext::CopyResource:...

Is there any way to add color to Model3D in WPF?

c#,wpf,3d,textures
I am writing a program in WPF. I am using HelixToolkit to load models from file (I need to load several models from files) like this: var importer = new HelixToolkit.Wpf.ModelImporter(); Model3D triangle = importer.Load("hand.obj"); ModelVisual3D Model = new ModelVisual3D(); Model.Content = triangle; MainViewPort.Children.Add(Model); And I need the entire Model3D,...

OpenGL 3.3 - I can only bind to GL_TEXTURE0

c++,opengl,textures,sfml
I've been trying to follow an OpenGL-3.3 tutorial for some time but it appears that I can only bind a texture to GL_TEXTURE0 otherwise I get a black square. Example: This works glClearColor(0.2f, 0.3f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glActiveTexture(GL_TEXTURE0 + 0); glBindTexture(GL_TEXTURE_2D, texture1); glUniform1i(glGetUniformLocation(shader.program, "our_texture1"), 0); shader.bind(); glBindVertexArray(vertex_array); glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT,...

three.js: local texture loading works, but not remotely

javascript,image,asynchronous,three.js,textures
I have modified an official example for the Loader object to demonstrate my issue. I want to create a mesh, with a texture map that gets loaded preferably before creating the geometry. Currently I have the issue, that local files load just fine, but not remote ones. See the behaviour...

Android OpenGL es 2.0 Can not reload textures on object.

android,textures,opengl-es-2.0,reload
I've managed to load textures and free rotate a sphere thanks to several tutorials, questions and answers asked here but i stumbled upon the need of texture reloading at runtime (get a bitmap image, process it and then apply it as a new texture to an object). I didnt find...

1555 DXT1 decompression giving incorrect image output

c++,image,textures,decompression
I am trying, in C++, to decompress 1555 DXT1 textures into RGBA 8888, storing the output into a std::string. I have successfully decompressed 565 DXT1 to RGBA 8888 using the squish lib, but just can't seem to get 1555 working. The program isn't crashing, and the output image looks almost...

OpenGL texture no matching overload function found

opengl,textures
first of all my Code of my Fragmenshader. #version 330 core struct Material{ sampler2D diffuse; }; struct Light{ vec3 position; vec3 ambient; vec3 diffuse; }; in vec3 Normal; in vec3 FragPos; in vec3 TexCoords; out vec4 color; uniform vec3 viewPos; uniform Material material; uniform Light light; void main() { //ambient...

OpenGL: GL_FRAMEBUFFER_UNSUPPORTED on specific combinations of framebuffer attachments

c++,opengl,textures,nvidia,framebuffer
Im trying to attach multiple targets to a framebuffer object. I have the following problem: There is no error, when using float texture attachments and a depth attachment. There is also no error, when using float texture attachments and integer texture attachments. Although these combinations work, I cant use float,...

Write positions to texture OpenGL/GLSL

c++,opengl,textures,glsl
I want to write the model-space vertex positions of a 3D mesh to a texture in OGL. Currently in order to write to a texture I set it to a fullscreen quad and write to it using a separate pass (based on tutorial seen here.) The problem is that, from...

Every way to get textures, WebGL

javascript,2d,textures,webgl
I was wondering if there was any other way to get textures in WebGL other than the standard Image() constructor. Specifically I would like to make a texture using the data from a tag in html, but I would also like to see other ways....

Difficulty in using smooth blurred textures in Unity

unity3d,textures
I have planned to use blurred textures as shadow for my planes by just placing them on the surface below it. In the first image you see below, there are three shadows. 1. Smiley's shadow: Default-Particle given by Unity and works great for this purpose. 2. Square: & 3. Arrow:...

THREEJS Shader Material overwritten

javascript,three.js,textures,webgl,shader
I have a shader material that works as expected. This shader has a texture attached. I want to create 2 meshes using this shader material, with a different texture for each mesh. Problem is that if I try to render my 2 meshes in the scene, the first object's material...

Passing texture to shader in OpenGL

c++,opengl,textures,shader
I'm working on some examples, and I was trying to pass a texture to a shader. To build a VAO, I have this piece of code: void PlaneShaderProgram::BuildVAO() { // Generate and bind the vertex array object glGenVertexArrays(1, &_vao); glBindVertexArray(_vao); // Generate and bind the vertex buffer object glGenBuffers(1, &_vbo);...

Packing arbitrary squares into a rectangle

image,algorithm,textures,packing,texture-packing
To provide some context, I have a couple of lightmaps for different objects in a 3D scene that I want to pack into a single texture. The lightmaps are square and have different sizes that are not necessarily power of two (although this restriction could be included if it makes...

Multiple [in] attributes in shader - OpenGL

c++,opengl,textures,shader
I'm to learn OpenGL 4 and now I working with textures. I would like to apply a texture to a sphere, and my vertex shader looks like this: #version 410 in vec4 vPosition; in vec2 texCoord; uniform mat4 mvpMatrix; uniform mat4 mvMatrix; uniform mat3 normalMatrix; uniform vec3 vLightPosition; smooth out...

Video Memory from ETC2 Texture Compression on OpenGL 4.3

c++,opengl,opengl-es,textures,glsl
Currently I'm writing a renderer which uses many textures and will fill up my graphics card's video memory (3 Gb for my nVidia GTX 780 Ti). So I pre-compressed all necessary images by using Mali's texture compression tool and integrated my renderer with libktx for loading compressed textures(*.ktx). The compression...

Texture not rendering properly in openGL ES 2 on Android

android,textures,opengl-es-2.0
I'm having an issue rendering textures in openGL ES 2 on Android. The image is being drawn but the texture ism't wrapping correctly by the look of it. I have tried all the usual things to fix the issue but nothing has worked. Here's how one of the images should...

Issues refactoring GLES30 shader?

opengl-es,textures,glsl,shader,hlsl
I'm currently rewriting a shader written in GLES30 for the GLES20 shader language. I've hit a snag where the shader I need to convert makes a call to the function textureLod, which samples the currently bound texture using a specific level-of-detail. This call is made within the fragment shader, which...

How to texture of a glutSolidTorus in OpenGL? [closed]

opengl,graphics,textures
I am trying to texture a glutSolidTorus(). Here is my code: glColor3f(1.0f, 1.0f, 1.0f); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, tiring); glutSolidTorus(.55, 1.8, 25, 25); glDisable(GL_TEXTURE_2D); But it does not work. How can I texture glutSolidTorus()?...

Android OpenGL 2 Scrolling Texture Loses Quality Over Time

android,textures,opengl-es-2.0
I'm trying to create a simple game for Android, using OpenGL 2 ES, that utilizes a repeating scrolling texture for the background. I managed to draw the texture, scroll it, and repeat. It works really well for the first few seconds, then the quality of the image starts to degrade...

How are textures mapped to 3D objects?

c++,opengl,3d,textures,texture-mapping
I'm currently learning C++ and OpenGL and was wondering how the below code is able to map a texture to a 3D object within a scene. The code currently works, but I'm struggling to understand it. //In the Pixel Shader. float pi = 3.14159265359; vec3 N = normalize (Normal); vec3...

Multitexturing theory with texture objects and samplers

opengl,textures
I couldn't find any good theory articles on how to code multitexturing with either only texture objects or texture objects plus samplers. I just don't know how to manage the glActiveTexture function and what it exactly does. glGenTextures(1, &texture); glActiveTexture(GL_TEXTURE0 + 0); // Number between 0 and GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS glBindTexture(GL_TEXTURE_2D, texture);...

Cube in OpenGL ES 2.0 does not draw the given textures

java,android,textures,opengl-es-2.0,cube
Normally I would not bother you with my questions, but this time I'm rather desperate. First of all, I'm fairly new to OpenGL so please don't shoot me if I've made some rookie mistakes. I've seen some examples already, but some of the example code is not understandable for me....

sharing cuda texture among multiple streams

cuda,textures
I have a texture which I am using for reading an image. So, the texture is defined as: texture<uchar4, 2, cudaReadModeNormalizedFloat> text; I have a CUDA kernel which uses this texture to read some image pixel value as: __global__ void resample_2D(float4* result, int width, nt height, float* x, float* y)...

Bitmap too large to be uploaded into a texture

android,bitmap,textures
I've in drawable directory an image file with the 960x1440 size. When the app start, the image is not loaded as background and in the logcat I see: Bitmap too large to be uploaded into a texture (2880x4320, max=4096x4096) Why it says 2880x4320 if the image is 960x1440 ? The...

Fixed Pipeline texture rendering

c++,opengl,textures
I'm trying to map a generated 2D texture on a quad. So far the quad is rendered, but it is gray if I don't set a color and if I set colors for the vertices it shows the colors, yet the texture is not shown. The reason for using fixed...

Open-GL Texture-coordinates changing by changing triangle size

c,opengl,textures,texture-mapping,texture2d
I have a problem with a texture-mapping with Open-GL. (1) is the texture. I want to use a triangle out of this (2) just for description the texture splitted in triangles (3) mapped texture to triangles 16x16 (height x width) (4) WRONG mapping for deformed triangles (in case of triangle...

OpenGL texture not rendering through GLSL

c++,opengl,textures,glsl
so i have a very simple glsl shader that renders an object with texture and directional light. now I'm having a really tough time trying to get the texture to display, everything else works except for that. when i disable the shader( glUseProgram(0) ) the texture renders in black and...

OpenGL ES 2.0 on Android: Cannot load Textures

java,android,opengl-es,textures,shader
I'm a fixed-function pipeline guy getting used to the newfangled shader stuff. I'm trying to extend the Android OpenGL ES example to texture a square shape. If the last line of my shader is gl_Fragcolor = vColor; I get a white square. If it is gl_FragColor = vColor * texture2D(u_Texture,...

Retrieve Vertices Data in THREE.js

three.js,textures,webgl,shader,vertex-shader
I'm creating a mesh with a custom shader. Within the vertex shader I'm modifying the original position of the geometry vertices. Then I need to access to this new vertices position from outside the shader, how can I accomplish this?

SDL2_image rendering not working properly

c++,image,textures,sdl
I am trying to render an image using SDL_image v2.0.0, in SDL2. I have an image called Red.png in my res/img/ folder. When I try to load the texture, and use SDL_QueryTexture() it gets the size and everything just fine. But when it comes to rendering the actual image, Ive...

Libgdx Pixmap Memory Leak

memory,libgdx,textures,pixmap
I am codeing a little project where i need a Line from a given Object to my Mouse. I made things work and came up with this quick and dirty code: addListener(new ClickListener() { Image lineImage; Pixmap pixmap; @Override public void touchDragged(InputEvent event, float x, float y, int pointer) {...

OpenGL 4.5 Buffer Texture : extensions support

opengl,cuda,textures,buffer,opengl-4
I use OpenGL Version 4.5.0, but somehow I can not make texture_buffer_object extensions work for me ("GL_EXT_texture_buffer_object" or "GL_ARB_texture_buffer_object"). I am quite new with OpenGL, but if I understand right, these extensions are quite old and even already included in the core functionality... I looked for the extensions with "OpenGL...

What does OpenGL Bindless Texture function glMakeTextureHandleNonResident ACTUALLY do?

c++,opengl,textures,opengl-4
I have a working prototype that tests bindless textures. I have a camera that pans over 6 gigs of texture, while i only have 2 gigs of VRAM. I have an inner frustum that is used to get the list of objects in the viewport for rendering, and an outer...

scale texture opengl 2

opengl,textures,scale
I have a rectangle in opengl 2 and I'm using a texture for it. It Works, but the texture is repeated over the rectangle, and what I want is to adapt to the size of the rectangle. I have read in this tutorial about the different parameters you can set...

Can linear filtering be used for an FBO blit of an MSAA texture to non-MSAA texture?

opengl,textures,framebuffer,blit,msaa
I have two 2D textures. The first, an MSAA texture, uses a target of GL_TEXTURE_2D_MULTISAMPLE. The second, non MSAA texture, uses a target of GL_TEXTURE_2D. According to OpenGL's spec on ARB_texture_multisample, only GL_NEAREST is a valid filtering option when the MSAA texture is being drawn to. In this case, both...

Trouble with slick.util and lwjgl textures

java,opengl,textures,lwjgl,slick2d
So I've recently started making a simple 2-D java game using jlwgl and slick-util. I ran into a problem when trying to load in textures to place on my tiles. I am using slick util to try and load textures in. This is the method I am using to do...

Fill C++ Cinder textures with RGBA values

c++,textures,pixel,cinder
I use the Cinder Library and want to create a texture, filled with RGBA values which I saved in an array. There is no helpfull explanation on the internet.

GLSL: sampler upload only works when unused sampler is removed

opengl,textures,glsl,framebuffer
Im currently trying to implement deferred shading with framebuffers in OpenGL. The framebuffer itself works perfectly, but when I dont use all uniform samplers in the shader, one of the textures stop working. This is my fragment shader, a test demonstration of the framebuffer: #version 330 core uniform sampler2D texCoordTex;...

Load multiple OBJ-files together with multple textures

ajax,three.js,textures
Using the many examples on ThreeJS, I'm able to load multiple OBJ files into my scene. I'm also able to load multiple images as textures. However, the textures get assigned to the objects in 'order of appearance' and therefore, sometimes the wrong image gets assigned to the OBJ files. I...

Wrapping texture coordinates manually

c++,filter,textures,wrap,hlsl
Edit: I have identified the problem to be similar to the question here but I still can't come up with a solution since my problem is a little different. I am using C++ and HLSL and need to have my texture coordinates wrap so that the texture is tiled across...

NullPointerException when trying to set item texture - minecraft 1.8 modding [closed]

java,nullpointerexception,textures,minecraft,minecraft-forge
I'm learning how to java and trying to build a minecraft mod. The problem is I'm having trouble with the 1.8 item texture adding system and even though Google is my best friend I still haven't found what I should do to fix this NPE. Here is the Base Mod...

libGDX - TextureRegion drawing weird when scaled

java,libgdx,drawing,textures,texture-packing
Having a weird issue. I have a Texture with four frames of a sprite Animation. Each frame is loaded as a TextureRegion. Most of the time the Animation play without any issues, but occasionally it will draw too much of the Texture in one frame. Here's an example of what...

Memory leak caused loading textures, despite calling glDeleteTextures after rendering function

c++,opengl,memory,memory-leaks,textures
I'm loading a texture using a class that I've written, as shown below. The aim is to create a new texture, load it with data that is stored in an array, and render it onto the screen. The texture is created without any problem, and loaded as well. However, it's...

Libgdx scaling background issue

java,libgdx,textures,sprite,scaling
So i am creating a game where i will draw a background but this background doesen't cover the whole screen, even when i lower the window size it doesen't cover the whole window. Here is the code for drawing the background: Gdx.gl20.glClearColor(0.2F, 0.6F, 1F, 1F); Gdx.gl20.glClear(GL20.GL_COLOR_BUFFER_BIT); cam.update(); sb.setProjectionMatrix(cam.combined); sb.begin(); sb.draw(Assets.splash_spr_background,...