Java-Gaming.org Hi !
Featured games (88)
games approved by the League of Dukes
Games in Showcase (679)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (733)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 5 6 [7] 8 9 10
 61 
 on: 2016-05-27 21:05:49 
Started by useless - Last post by thedanisaur
I'm not sure about layout(binding=0), my dev computers graphics card does not support it, so I haven't used it.

That being said setUniformi() doesn't do any "binding" it associates a uniform name with the value at the unit location.

When you activate a texture slot:
1  
gl.glActiveTexture(GL4.GL_TEXTURE0 + unit);

you are ready to bind a texture:
1  
gl.glBindTexture(GL4.GL_TEXTURE_2D, m_material.m_diffuse_map.m_id);

With your texture(s) bound you now need to tell the program which uniform references the slot:
1  
gl.setUniform1i("diffuse_map", unit); 



Did you check your image buffer to make sure that it's not full of garbage?


Edit: to be clear, you do not have to call glActiveTexture() when only using one texture at a time, however the others are a must.

 62 
 on: 2016-05-27 21:02:42 
Started by DarkCart - Last post by ziozio
Open Source does not mean "Please Copy Me". It just means you can see how the binaries are made. You'll note that every single source file in the JDK contains an actual copyright notice.

Cas Smiley

I'm not a copyright expert but doesn't GNU General Public License version 2allow you to modify the files but to keep the license terms?

 63 
 on: 2016-05-27 21:01:25 
Started by steveyg90 - Last post by steveyg90
Started to work on health and crafting, this is latest screen shot:


 64 
 on: 2016-05-27 20:57:52 
Started by DarkCart - Last post by ziozio
Forget Oracle, Google, whoever. Imagine you, personally, had designed the entire Java API from scratch all on your own, and it took you 20 years, and you planned to sell licenses to use it, and it was going pretty well.

Now imagine I downloaded it, carefully copied the most important 10,000 lines of code out of it, did a search-and-replace for Java and replaced it with Cafe, and then subsequently made $40bn on top of it.

You'd be extra cross, am I right?

If I had spent 20 years creating Java API's, tried to sell license but failed to make any real business out of it and then allowed an open source version to live I don't think I would have a right to be cross.

 65 
 on: 2016-05-27 20:54:54 
Started by DarkCart - Last post by princec
Open Source does not mean "Please Copy Me". It just means you can see how the binaries are made. You'll note that every single source file in the JDK contains an actual copyright notice.

Cas Smiley

 66 
 on: 2016-05-27 20:45:22 
Started by useless - Last post by useless
I have changed my code so that glUseProgram now comes before texture bind. Graphics card driver supports opengl 4.4.0, so im good there. Still the same, however.

Let me get one thing straight first. If Im using this layout(binding=0) thing there is no need to be setting that uniform from code like you did with this setuniform("diffuse_map", unit)?

Using setuniform to bind a uniform to a texture bank seems kind of wierd to me, shouldnt that be more something like binduniform??

 67 
 on: 2016-05-27 20:31:22 
Started by DarkCart - Last post by noctarius
Forget Oracle, Google, whoever. Imagine you, personally, had designed the entire Java API from scratch all on your own, and it took you 20 years, and you planned to sell licenses to use it, and it was going pretty well.

For me it is simple: If I don't anyone to make this happen I don't open source it. I do pretty much everything as open source and almost everything is Apache License 2, therefore everybody is able to do this and it is on purpose. Obviously I prefer it happens to me but Google would most probably be able to attract a lot more devs than I could.

Apart from that there is a difference between me / you personally and a corporation. If Oracle wins and Microsoft sues you for using a Windows API, do you have millions of dollars to spare on such a shit? Cheesy

 68 
 on: 2016-05-27 20:31:10 
Started by stuart6854 - Last post by stuart6854
Ah, JOML to the rescue. Thanks  Smiley

 69 
 on: 2016-05-27 20:24:06 
Started by DarkCart - Last post by jonjava
because corporations have the same rights in law as you or I have.

Yeah, no.

[EDIT]: As in they reap the benefits but take none of the, erm, the other thing.

[EDIT2]: In other words a corp isn't personally liable for anything. A corp isn't a person. It's a construct. It's an important distinction I think. I feel context should be taken into greater consideration.

 70 
 on: 2016-05-27 20:20:36 
Started by noctarius - Last post by noctarius
Btw, a Scope object is "a unit of resources allocation that can be released all together". The current prototype has the NativeScope and HeapScope classes. The later uses long[] as the backing memory (on which you can map structs etc).

Yes correct, thanks for answering Smiley Was busy again the last days!

Pages: 1 ... 5 6 [7] 8 9 10
 
DarkCart (13 views)
2016-05-29 02:30:33

Hydroque (25 views)
2016-05-26 14:45:46

Mac70 (44 views)
2016-05-24 21:16:33

theagentd (47 views)
2016-05-14 18:38:35

theagentd (80 views)
2016-05-10 22:37:41

theagentd (88 views)
2016-05-10 22:33:46

IanParcs (114 views)
2016-04-18 14:18:53

KaiHH (113 views)
2016-04-18 08:35:41

KaiHH (134 views)
2016-04-15 12:43:58

theagentd (138 views)
2016-04-14 02:16:17
FPS Camera Tutorial
by Hydroque
2016-05-22 05:40:58

Website offering 3D Models specifically for games for free
by vusman
2016-05-18 17:23:09

Website offering 3D Models specifically for games for free
by vusman
2016-05-09 08:50:56

Website offering 3D Models specifically for games for free
by vusman
2016-05-06 11:10:21

Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50
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!