Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (487)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (552)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Ridiculous Image Loading/Shader/OpenGL "Error"  (Read 727 times)
0 Members and 1 Guest are viewing this topic.
Offline Slyth2727
« Posted 2013-08-19 02:24:33 »

I am using Slick Utils to load an image in LWJGL, however when I start the program it crashes with the "error"

4.2.12217 Compatibility Profile Context 12.104
Sun Aug 18 22:25:31 EDT 2013 INFO:Use Java PNG Loader = true

This is my code for getting the image:

1  
         int id = TextureLoader.getTexture(ext, new FileInputStream(new File("./res/textures/" + fileName))).getTextureID();


If anyone could point me in the right direction that would be great. This ridiculous "error" is making me nuts.

Update: I have removed the image loading and now I just receive a

4.2.12217 Compatibility Profile Context 12.104

I am using a shader. Would this be because of the shader? I was always able to run this with the shader, but as soon as I added the image loading it errored out. Now I have removed the image loading and it is still doing it! What should I do??

Was I before Chuang Tzu who dreamt about being a butterfly, or am I now a butterfly who dreams about being Chuang Tzu?
Offline princec

JGO Kernel


Medals: 363
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #1 - Posted 2013-08-19 05:56:48 »

That's not an error.

Cas Smiley

Offline ra4king

JGO Kernel


Medals: 345
Projects: 2
Exp: 5 years


I'm the King!


« Reply #2 - Posted 2013-08-19 06:53:22 »

Hahaha yeah that's definitely not an error. Have you made sure the code works and something renders in the first place before wondering what the print-outs mean?

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Slyth2727
« Reply #3 - Posted 2013-08-19 07:54:07 »

Well yes it completely worked, I was rendering a cube in from a model and/or from a Mesh class. Then one time I tried to run it and boom it crashes with that... Is it because of my shader? Here:

Vert:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
#version 330

out vec3 fragColor;

in vec2 texCoord0;

uniform sampler2D sampler;

void main(){
   gl_FragColor = texture2d(sampler, texCoord0.xy);
}


Frag:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
#version 330

layout (location = 0) in vec3 position;
layout (location = 1) in vec2 texCoord;

out vec2 texCoord0;

uniform mat4 transform;

void main(){
   gl_Position = transform * vec4(position, 1.0);
   texCoord0 = texCoord0;
}

Was I before Chuang Tzu who dreamt about being a butterfly, or am I now a butterfly who dreams about being Chuang Tzu?
Offline Slyth2727
« Reply #4 - Posted 2013-08-19 07:56:49 »

AHA! It WAS the shader! Fixed and running now, sorry about this thread, if an admin wants to delete it feel free Smiley

Was I before Chuang Tzu who dreamt about being a butterfly, or am I now a butterfly who dreams about being Chuang Tzu?
Offline ra4king

JGO Kernel


Medals: 345
Projects: 2
Exp: 5 years


I'm the King!


« Reply #5 - Posted 2013-08-19 08:21:24 »

Your switched your shaders, vertex is actually the fragment shader and vice versa. Also check line 12 of your "frag" (the actual vertex shader), you are assigning texCoord0 to itself.

Offline HeroesGraveDev

JGO Kernel


Medals: 246
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #6 - Posted 2013-08-19 08:30:24 »

I hate GLSL.
So easy to make a simple mistake, but it takes anywhere up to 20 minutes to find it.

Offline Slyth2727
« Reply #7 - Posted 2013-08-19 09:12:44 »

Yeah we need an IDE just for GLSL Wink

Was I before Chuang Tzu who dreamt about being a butterfly, or am I now a butterfly who dreams about being Chuang Tzu?
Offline cylab

JGO Ninja


Medals: 43



« Reply #8 - Posted 2013-08-19 09:40:34 »

http://stackoverflow.com/questions/5593274/tools-for-glsl-editing

Mathias - I Know What [you] Did Last Summer!
Offline StrideColossus
« Reply #9 - Posted 2013-08-19 09:42:36 »

No IDEs as such AFAIK, but some handy tools that I've used after finding this:  http://stackoverflow.com/questions/5593274/tools-for-glsl-editing

EDIT: gah, beaten to it by cylab  Roll Eyes
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline nsigma
« Reply #10 - Posted 2013-08-19 10:05:38 »

Shameful self promotion ...  Grin

Praxis LIVE has a live GLSL component that allows you to try stuff out on the fly.  The editor has syntax highlighting, though not autocomplete as yet.  Fragment shader only at the moment - vertex editing coming hopefully in the next release.

The OpenGL pipeline is LWJGL based, so works much better than the WebGL stuff for me (which brings my laptop to its knees).

Must do a proper thread on here about Praxis LIVE, and uses like this at some point ...

Praxis LIVE - open-source intermedia toolkit and live interactive visual editor
Digital Prisoners - interactive spaces and projections
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CopyableCougar4 (23 views)
2014-08-22 19:31:30

atombrot (34 views)
2014-08-19 09:29:53

Tekkerue (30 views)
2014-08-16 06:45:27

Tekkerue (28 views)
2014-08-16 06:22:17

Tekkerue (18 views)
2014-08-16 06:20:21

Tekkerue (27 views)
2014-08-16 06:12:11

Rayexar (65 views)
2014-08-11 02:49:23

BurntPizza (41 views)
2014-08-09 21:09:32

BurntPizza (31 views)
2014-08-08 02:01:56

Norakomi (41 views)
2014-08-06 19:49:38
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!